﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;

using ProjectBase.Core;

namespace $safeprojectname$.Services
{
    [Serializable]
    public class Phrase : Persistent<int>
    {
        public virtual Translator Translator { get; set; }
        public virtual string Language { get; set; }
        public virtual string Localization { get; set; }

        public override string ToDisplay()
        {
            return Language + " - " + Localization;
        }

        protected override string GetDomainObjectSignature()
        {
            return Language + "|" + Localization;
        }

        public virtual Phrase Clone(Translator translator = null)
        {
            var entity = new Phrase
            {
                Language = Language,
                Localization = Localization,
            };

            entity.SetID(ID);
            return entity;
        }
    }
}